<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>在线工具集 - 高效、简洁、实用</title>
    <link rel="icon" type="image/x-icon" href="/tools/static/favicon.ico">
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
            background: linear-gradient(135deg, #e0e7ff 0%, #f3e8ff 100%);
            color: #1f2937;
            min-height: 100vh;
            position: relative;
            overflow-x: hidden;
        }

        /* 导航栏 */
        .navbar {
            background: rgba(255, 255, 255, 0.95);
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
            position: sticky;
            top: 0;
            z-index: 1000;
            padding: 15px 40px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .navbar .logo {
            font-size: 1.5rem;
            font-weight: 700;
            color: #1e40af;
            text-decoration: none;
        }

        .navbar .nav-links {
            display: flex;
            gap: 20px;
        }

        .navbar .nav-links a {
            color: #374151;
            text-decoration: none;
            font-size: 1rem;
            font-weight: 500;
            transition: color 0.3s ease;
        }

        .navbar .nav-links a:hover {
            color: #3b82f6;
        }

        /* 英雄区域 */
        .hero {
            text-align: center;
            padding: 80px 20px;
            position: relative;
            z-index: 1;
        }

        .hero h1 {
            font-size: 3rem;
            color: #1e40af;
            margin-bottom: 20px;
            text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
            animation: fadeInDown 1s ease-out;
        }

        .hero p {
            font-size: 1.25rem;
            color: #374151;
            max-width: 600px;
            margin: 0 auto 40px;
            line-height: 1.6;
            animation: fadeIn 1.2s ease-out;
        }

        .hero .cta-btn {
            display: inline-block;
            padding: 14px 30px;
            background: linear-gradient(45deg, #3b82f6, #2563eb);
            color: white;
            text-decoration: none;
            border-radius: 8px;
            font-size: 1.1rem;
            font-weight: 600;
            transition: transform 0.2s, box-shadow 0.3s, background 0.3s;
            animation: fadeInUp 1.4s ease-out;
        }

        .hero .cta-btn:hover {
            transform: translateY(-3px);
            box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
            background: linear-gradient(45deg, #60a5fa, #3b82f6);
        }

        /* 工具展示区域 */
        .tools-section {
            padding: 60px 20px;
            max-width: 1200px;
            margin: 0 auto;
        }

        .tools-section h2 {
            font-size: 2rem;
            color: #1e40af;
            text-align: center;
            margin-bottom: 40px;
            text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
        }

        .tools-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 30px;
            padding: 0 20px;
        }

        .tool-card {
            background: rgba(255, 255, 255, 0.95);
            border-radius: 16px;
            padding: 30px;
            box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
            text-align: center;
            transition: transform 0.3s ease, box-shadow 0.3s ease;
            cursor: pointer;
        }

        .tool-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
        }

        .tool-card .icon {
            font-size: 3rem;
            color: #3b82f6;
            margin-bottom: 20px;
        }

        .tool-card h3 {
            font-size: 1.5rem;
            color: #374151;
            margin-bottom: 15px;
        }

        .tool-card p {
            font-size: 1rem;
            color: #6b7280;
            line-height: 1.6;
        }

        /* 页脚 */
        .footer {
            background: rgba(255, 255, 255, 0.95);
            padding: 20px;
            text-align: center;
            border-top: 1px solid #e5e7eb;
            position: relative;
            z-index: 1;
        }

        .footer p {
            color: #6b7280;
            font-size: 0.9rem;
        }

        .footer a {
            color: #3b82f6;
            text-decoration: none;
            font-weight: 500;
        }

        .footer a:hover {
            text-decoration: underline;
        }

        /* 背景动画效果 */
        .background-shapes {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: 0;
            overflow: hidden;
            pointer-events: none
        }

        .shape {
            position: absolute;
            background: rgba(255, 255, 255, 0.2);
            border-radius: 50%;
            animation: float 15s infinite ease-in-out;
        }

        .shape:nth-child(1) {
            width: 150px;
            height: 150px;
            top: 10%;
            left: 15%;
            animation-delay: 0s;
        }

        .shape:nth-child(2) {
            width: 200px;
            height: 200px;
            top: 60%;
            left: 70%;
            animation-delay: 3s;
        }

        .shape:nth-child(3) {
            width: 100px;
            height: 100px;
            top: 40%;
            left: 30%;
            animation-delay: 6s;
        }

        /* 动画 */
        @keyframes fadeInDown {
            0% {
                opacity: 0;
                transform: translateY(-20px);
            }
            100% {
                opacity: 1;
                transform: translateY(0);
            }
        }

        @keyframes fadeIn {
            0% {
                opacity: 0;
            }
            100% {
                opacity: 1;
            }
        }

        @keyframes fadeInUp {
            0% {
                opacity: 0;
                transform: translateY(20px);
            }
            100% {
                opacity: 1;
                transform: translateY(0);
            }
        }

        @keyframes float {
            0% {
                transform: translateY(0) translateX(0);
                opacity: 0.6;
            }
            50% {
                transform: translateY(-100px) translateX(50px);
                opacity: 0.3;
            }
            100% {
                transform: translateY(0) translateX(0);
                opacity: 0.6;
            }
        }

        /* 响应式设计 */
        @media (max-width: 768px) {
            .navbar {
                flex-direction: column;
                gap: 10px;
                padding: 10px 20px;
            }

            .navbar .nav-links {
                flex-direction: column;
                align-items: center;
                gap: 10px;
            }

            .hero h1 {
                font-size: 2.5rem;
            }

            .hero p {
                font-size: 1rem;
            }

            .tools-section h2 {
                font-size: 1.75rem;
            }

            .tool-card {
                padding: 20px;
            }

            .tool-card h3 {
                font-size: 1.25rem;
            }

            .tool-card p {
                font-size: 0.9rem;
            }
        }

        @media (max-width: 480px) {
            .hero {
                padding: 40px 20px;
            }

            .hero h1 {
                font-size: 2rem;
            }

            .hero .cta-btn {
                padding: 12px 24px;
                font-size: 1rem;
            }

            .tools-section {
                padding: 40px 10px;
            }
        }
    </style>
</head>
<body>
<!-- 背景浮动元素 -->
<div class="background-shapes">
    <div class="shape"></div>
    <div class="shape"></div>
    <div class="shape"></div>
</div>

<!-- 导航栏 -->
<nav class="navbar">
    <a href="/tools/index" class="logo">在线工具集</a>
    <div class="nav-links">
        <a href="/tools/to/xml_format">XML 格式化</a>
        <a href="/tools/to/json_format">JSON 格式化</a>
        <a href="/tools/to/img_to_ico">图片转Favicon</a>
    </div>
</nav>

<!-- 英雄区域 -->
<section class="hero">
    <h1>欢迎使用在线工具集</h1>
    <p>我们为您提供高效、简洁、实用的在线工具，助力您的开发与设计工作。立即体验吧！</p>
    <a href="#tools" class="cta-btn">探索工具</a>
</section>

<!-- 工具展示区域 -->
<section class="tools-section" id="tools">
    <h2>我们的工具</h2>
    <div class="tools-grid">
        <div class="tool-card" data-href='/tools/to/xml_format'>
            <div class="icon">📄</div>
            <h3>XML 格式化工具</h3>
            <p>快速格式化或压缩您的 XML 数据，支持错误提示和复制功能，轻松提升代码可读性。</p>
        </div>
        <div class="tool-card" data-href='/tools/to/json_format'>
            <div class="icon">📋</div>
            <h3>JSON 格式化工具</h3>
            <p>一键格式化或压缩 JSON 数据，清晰展示嵌套结构，方便调试和分享。</p>
        </div>
        <div class="tool-card" data-href='/tools/to/img_to_ico'>
            <div class="icon">🖼️</div>
            <h3>图片转Favicon工具</h3>
            <p>将图片转换为 favicon.ico，支持多种尺寸选择，拖拽上传，快速生成网站图标。</p>
        </div>
        <div class="tool-card" data-href="/tools/to/sql_format">
            <div class="icon">🗃️</div>
            <h3>SQL 格式化工具</h3>
            <p>格式化或压缩您的 SQL 语句，支持复杂查询和占位符，提升代码可读性。</p>
        </div>
    </div>
</section>

<!-- 页脚 -->
<footer class="footer">
    <p>&copy; 2025 在线工具集 </p>
</footer>
</body>
<script>
    // 为所有工具卡片绑定点击事件
    document.querySelectorAll('.tool-card').forEach(card => {
        card.addEventListener('click', () => {
            const href = card.getAttribute('data-href');
            if (href) {
                window.location.href = href;
            }
        });
    });
</script>
</html>